package com.heima.feign;

import com.heima.fallback.UserClientFallback;
import com.heima.interceptor.FeignRequestInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author chenshan
 */
@FeignClient(value = "leadnews-user", fallbackFactory = UserClientFallback.class, configuration = FeignRequestInterceptor.class)
public interface UserFeignClient {
    /**
     * 查询已登录用户的id
     * @return Integer 用户id
     */
    @GetMapping("api/v1/login/selectUserId")
    public Integer selectUserId();
}
